import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '班组名',
    align: "center",
    dataIndex: 'woName'
  },
  {
    title: '月度平均分',
    align: "center",
    dataIndex: 'averageActValue'
  },
  {
    title: '提示信息',
    align: "center",
    dataIndex: 'message'
  },
  {
    title: '有效样本数',
    align: "center",
    dataIndex: 'countNum'
  },
  {
    title: '所属年月',
    align: "center",
    dataIndex: 'belongMonth',
    customRender:({text}) =>{
      text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
      return text;
    },
  },
  {
    title: '任务开始时间',
    align: "center",
    dataIndex: 'targetStartDate'
  },
];

// 高级查询数据
export const superQuerySchema = {
  woName: {title: '班组名',order: 0,view: 'text', type: 'string',},
  averageActValue: {title: '月度平均分',order: 1,view: 'text', type: 'string',},
  message: {title: '提示信息',order: 2,view: 'text', type: 'string',},
  countNum: {title: '有效样本数',order: 3,view: 'text', type: 'string',},
  belongMonth: {title: '所属年月',order: 4,view: 'date', type: 'string',},
  targetStartDate: {title: '任务开始时间',order: 5,view: 'datetime', type: 'string',},
};
